package com.acme.bankapp.domain.bank;

import java.util.ArrayList;
import java.util.List;

import com.acme.bankapp.domain.bank.Account;

public class Client {
	private Gender gender;
	private String name;
	private List<Account> accounts;

	public Client(Gender gender, String name, List<Account> accounts) {
		this(gender, name);
		this.accounts.addAll(accounts);
	}

	public Client(Gender gender, String name, Account account) {
		this(gender, name);
		this.accounts.add(account);
	}
	public Client(Gender gender, String name) {
		this.gender = gender;
		this.name = name;
		this.accounts = new ArrayList<Account>();
	}

	public String getClientSalutation() {
		return this.gender.genToString() + this.name;
	}

	public void addAccount(Account account) {
		accounts.add(account);
	}

	public List<Account> getAccounts() {
		return accounts;
	}

}
